package com.example.warehouse.bus.pojo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 欧胤
 * @version 1.0
 * @description: 商品表实体类
 * @date 2023/6/30 9:13
 */
@Data
@TableName("bus_goods")
public class BusGoods implements Serializable {
    @ExcelProperty(value = "数据ID",index = 0)
    @TableId(type = IdType.AUTO)
    private Long id;                          // 数据ID

    @ExcelProperty(value = "商品名",index = 1)
    private String goodsName;                 // 商品名

    @ExcelProperty(value = "供应商ID",index = 2)
    private Long providerId;                  // 供应商ID

    @ExcelProperty(value = "商品产地",index = 3)
    private String producePlace;              // 商品产地

    @ExcelProperty(value = "规格",index = 4)
    private String size;                      // 规格

    @ExcelProperty(value = "包装",index = 5)
    private String goodsPackage;              // 包装

    @ExcelProperty(value = "生产批号",index = 6)
    private String productCode;               // 生产批号

    @ExcelProperty(value = "批准文号",index = 7)
    private String promitCode;                // 批准文号

    @ExcelProperty(value = "商品描述",index = 8)
    private String description;               // 商品描述

    @ExcelProperty(value = "销售价格",index = 9)
    private Double price;                     // 销售价格

    @ExcelProperty(value = "数量",index = 10)
    private Integer number;                   // 数量

    @ExcelProperty(value = "库存预警值",index = 11)
    private Integer dangerNum;                // 库存预警值

    @ExcelProperty(value = "商品图片",index = 12)
    private String goodsImg;                  // 商品图片

    @ExcelProperty(value = "是否启用",index = 13)
    private Integer enable;                   // 是否启用1启用0不启用

    /**
     * 数据创建时间
     */
    @ExcelProperty(value = "数据创建时间",index = 14)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 数据最后修改时间
     */
    @ExcelProperty(value = "数据最后修改时间",index = 15)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;
}
